package cn.rkylin.oms.accountreport.adapter;

import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.rkylin.core.IDataBaseFactory;
import cn.rkylin.oms.item.domain.Item;

/**
 * 
 * 淘宝账单适配器
 * 
 * @author jipengcheng
 * @created 2017.04.25
 */

@Service("taoBaoAccountreportAdatper")
public class TaoBaoAccountreportAdatper extends AccountreportAdatper {
	private static final Log logger = LogFactory.getLog(TaoBaoAccountreportAdatper.class);

	/**
	 * 数据库访问对象
	 */
	@Autowired
	private IDataBaseFactory dao;

	/**
	 * 构造函数
	 */
	public TaoBaoAccountreportAdatper() {
	}

	/**
	 * 下载账单
	 * 
	 * @param shopId
	 * @param paramMap
	 * @return
	 */
	@Override
	public int download(String shopId, Map<String, Object> paramMap) {
		try {
			return getAccountreportVisitor().getAccountreport(shopId, paramMap);
		} catch (Exception ex) {
			// TODO Auto-generated catch block
			logger.error(ex.getMessage(), ex);
			return 0;
		}
	}
}
